﻿using System.ServiceModel;
using System.ServiceModel.Dispatcher;
using JetBrains.Annotations;

namespace MugenInjection.Wcf.Interface
{
    /// <summary>
    /// Behavior for release instance in <see cref="IInstanceProvider"/>.
    /// </summary>
    public interface IReleaseInstanceBehavior
    {
        /// <summary>
        /// Called when an <see cref="T:System.ServiceModel.InstanceContext"/> object recycles a service object.
        /// </summary>
        /// <param name="instanceContext">The service's instance context.</param><param name="instance">The service object to be recycled.</param>
        void Release(InstanceContext instanceContext, object instance);
    }
}